package com.simple.example.dubbo.apiuser.controller;

import com.example.common.dto.GetUserDTO;
import com.simple.example.dubbo.apiuser.service.IUserAPIService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created by hzy on 2019/1/20.
 */
@RestController
@RequestMapping("/api")
public class TestUserController {

    @Autowired
    IUserAPIService userAPIService;

    @RequestMapping("/search_user")
    public GetUserDTO searchUserByName(@RequestParam("userName") String userName){
        return userAPIService.findUserByName(userName);
    }
}
